package pers.hl.module_main.common

import androidx.annotation.LayoutRes
import androidx.viewbinding.ViewBinding
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import pers.hl.module_main.R

abstract class BaseLibQuickAdapter<T, VH : BaseViewHolder>(
    @LayoutRes private val layoutResId: Int,
    data: MutableList<T>? = null) : BaseQuickAdapter<T, VH>(layoutResId, data) {

    protected val TAG = javaClass.simpleName

    fun setEmptyView() {
        isUseEmpty = true
        setEmptyView(R.layout.layout_empty)
    }

    /**
     * 是否开启ViewBinding，默认true
     */
    fun enableViewBinding(): Boolean {
        return true
    }
}